import chromadb
from chromadb.config import Settings

client = chromadb.PersistentClient(path='knowledge.db')
collection = client.get_or_create_collection(name="interview")


# 初始化 Chroma 客户端并配置存储路径
def init_chroma_db():
    client = chromadb.PersistentClient(path='knowledge.db')
    return client


def create_chroma_collection(client, collection_name="interview_questions"):
    return client.get_or_create_collection(name=collection_name)
